#include "BOOL.h"

BOOL_ptr BOOL::NIL = BOOL_ptr(new BOOL(1LL << 0, make_string_ptr("NIL")));
BOOL_ptr BOOL::FALSE = BOOL_ptr(new BOOL(1LL << 1, make_string_ptr("FALSE")));
BOOL_ptr BOOL::TRUE = BOOL_ptr(new BOOL(1LL << 2, make_string_ptr("TRUE")));

BOOL::BOOL(uint64_t mask, string_ptr name)
{
  this->mask = mask;
  this->name = name;
}

bool BOOL::operator==(const BOOL &ps) const
{
  if (this->name->c_str() == ps.name->c_str())
    return true;
  return false;
}

bool BOOL::operator==(const BOOL_ptr ps) const
{
  if (this->name->c_str() == ps->name->c_str())
    return true;
  return false;
}

bool BOOL::operator!=(const BOOL &ps) const
{
  if (this->name->c_str() != ps.name->c_str())
    return true;
  return false;
}

bool BOOL::operator!=(const BOOL_ptr ps) const
{
  if (this->name->c_str() != ps->name->c_str())
    return true;
  return false;
}